package com.moyun.common.runner.dict;

import com.moyun.common.enums.dict.DictLoadEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 功能描述: 字典启动加载加载 <br/>
 */
@Component
@Order(value = 2)
@Slf4j
public class DictStartRunner implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) {
        try {
            log.info("===>开始 init字典缓存<===");
            DictLoadEnum.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
